<style type="text/css">
    #schedulepicker {
        padding-top: 7px;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="function" class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="function" name="row[function]"
                value="{:__($row.function)}" data-rule="required" placeholder="执行方法" disabled/>
        </div>
    </div>
    <div class="form-group">
        <label for="executetime" class="control-label col-xs-12 col-sm-2">{:__('执行时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="executetime" name="row[executetime]" value="{$row.executetime}"
                data-rule="required" placeholder="执行间隔时间，单位秒"/>
            <small class="text-danger">执行间隔时间，单位秒</small>
        </div>
    </div>
    <div class="form-group">
        <label for="executetime" class="control-label col-xs-12 col-sm-2">{:__('额外属性')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[configgroup]">
                <dd>
                    <ins>{:__('键名')}</ins>
                    <ins>{:__('值')}</ins>
                    <ins><span class="text-info">说明：</span></ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                        {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[configgroup]" class="form-control hide" cols="30"
                    rows="5">{$row.configgroup|htmlentities}</textarea>
            </dl>
            <script id="basictpl" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][key]" class="form-control"
                            value="<%=row.key%>" placeholder="键名" size="10" readonly/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control"
                            value="<%=row.value%>" placeholder="值"/></ins>
                    
                    <!--下面的两个按钮务必保留-->
                    <!-- <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> -->
                    <!-- <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span> -->
                </dd>
                <ins><input type="text" name="<%=name%>[<%=index%>][info]" class="form-control"
                        value="<%=row.info%>"
                        placeholder="说明" readonly/></ins>
            </script>
            <!-- <small class="text-danger"> 不懂别动！！！</small> -->
        </div>
        
    </div>
    <div class="form-group">
        <label for="weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="number" class="form-control" id="weigh" name="row[weigh]" value="{$row.weigh}"
                data-rule="required" size="6" />
            <small class="text-info">优先执行，越大越前</small>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group hide layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>

</form>